#include <stdio.h>

int main(int argc, char *argv[]) {

    int n = 0;
    scanf("%d", &n);
    int nums[n][n];
    for (size_t i = 0; i < n; i++)
    {
        for (size_t z = 0; z < n; z++)
        {
            scanf("%d", &nums[i][z]);
        }
    }
    for (size_t i = 0; i < n; i++)
    {
        for (size_t z = 0; z < n; z++)
        {
            printf("%d ", nums[z][i]);
        }
        printf("\n");
    }
    
    

    return 0;
}